#ifndef MODEL_H
#define MODEL_H

#include <QAbstractTableModel>
#include <QString>
#include <QDateTime>
#include <vector>
#include <QDebug>
#include <QBrush>
#include <QColor>
#include "entry.h"
#include <bot.h>
const int COLS = 4;

class Model : public QAbstractTableModel
{
	Q_OBJECT

public:
	Model(QObject *parent, Bot*);
	int rowCount(const QModelIndex &parent = QModelIndex()) const ;
    int columnCount(const QModelIndex &parent = QModelIndex()) const;
	QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
    bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole);
    Qt::ItemFlags flags(const QModelIndex & index) const ;
	QVariant headerData(int section, Qt::Orientation orientation, int role) const;
	~Model();

private:
	Bot *_botController;
	vector<Entry*> *allData;
	int rows;

signals:
    void editCompleted();
};

#endif // MODEL_H
